## API Report File for "@backstage/plugin-playlist-backend"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { BackstageIdentityResponse } from '@backstage/plugin-auth-node';
import { ConditionalPolicyDecision } from '@backstage/plugin-permission-common';
import { Conditions } from '@backstage/plugin-permission-node';
import express from 'express';
import { IdentityApi } from '@backstage/plugin-auth-node';
import { Logger } from 'winston';
import { Permission } from '@backstage/plugin-permission-common';
import { PermissionCondition } from '@backstage/plugin-permission-common';
import { PermissionCriteria } from '@backstage/plugin-permission-common';
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
import { PermissionPolicy } from '@backstage/plugin-permission-node';
import { PermissionRule } from '@backstage/plugin-permission-node';
import { PlaylistMetadata } from '@backstage/plugin-playlist-common';
import { PluginDatabaseManager } from '@backstage/backend-common';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { PolicyDecision } from '@backstage/plugin-permission-common';
import { PolicyQuery } from '@backstage/plugin-permission-node';
import { ResourcePermission } from '@backstage/plugin-permission-common';

// @public (undocumented)
export const createPlaylistConditionalDecision: (
  permission: ResourcePermission<'playlist-list'>,
  conditions: PermissionCriteria<PermissionCondition<'playlist-list'>>,
) => ConditionalPolicyDecision;

// @public (undocumented)
export function createRouter(options: RouterOptions): Promise<express.Router>;

// @public
export class DefaultPlaylistPermissionPolicy implements PermissionPolicy {
  // (undocumented)
  handle(
    request: PolicyQuery,
    user?: BackstageIdentityResponse,
  ): Promise<PolicyDecision>;
}

// @public (undocumented)
export const isPlaylistPermission: (permission: Permission) => boolean;

// @public (undocumented)
export type ListPlaylistsFilter =
  | {
      allOf: ListPlaylistsFilter[];
    }
  | {
      anyOf: ListPlaylistsFilter[];
    }
  | {
      not: ListPlaylistsFilter;
    }
  | ListPlaylistsMatchFilter;

// @public (undocumented)
export type ListPlaylistsMatchFilter = {
  key: string;
  values: any[];
};

// @public (undocumented)
export const playlistConditions: Conditions<{
  isOwner: PermissionRule<
    PlaylistMetadata,
    ListPlaylistsFilter,
    'playlist-list',
    {
      owners: string[];
    }
  >;
  isPublic: PermissionRule<
    PlaylistMetadata,
    ListPlaylistsFilter,
    'playlist-list',
    undefined
  >;
}>;

// @public
const playlistPlugin: () => BackendFeature;
export default playlistPlugin;

// @public (undocumented)
export interface RouterOptions {
  // (undocumented)
  database: PluginDatabaseManager;
  // (undocumented)
  discovery: PluginEndpointDiscovery;
  // (undocumented)
  identity: IdentityApi;
  // (undocumented)
  logger: Logger;
  // (undocumented)
  permissions: PermissionEvaluator;
}
```
